package weixin

import (
	"ginfast/app/weixin/api"
	"ginfast/app/weixin/model"
	"ginfast/pkg/ginx"
	"ginfast/pkg/orm"
)

func init() {
	orm.RegisterModel(&model.Config{})
	ginx.Register("/wechat", func(r *ginx.RouterGroup) {
		api.WeChat{}.Routers(r)
	})
	ginx.RegisterAuth("/v1/weixin", func(r *ginx.RouterGroup) {
		r.Register("/config", api.Config{}.Routers)
		r.Register("/user", api.User{}.Routers)
		r.Register("/material", api.Material{}.Routers)
		r.Register("/msg", api.Msg{}.Routers)
	})
}
